<template>
  <div>
    <h1>依赖注入</h1>
    <div>
        <Child/>
        <input type="text" v-model="name">
    </div>
  </div>
</template>

<script>
import Child from "@/components/InjectChild";
export default {
  components: {
    Child,
  },
  data() {
      return {
          name:'Inject'
      }
  },
  provide: function () {
    return {
      title: "依赖注入",
      name:this.name
    };
  },
};
</script>

<style>
</style>